home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2424 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: dax.cc.uakron.edu!tberg
  2. From: tberg@dax.cc.uakron.edu (timothy a berg)
  3. Newsgroups: comp.lang.c++
  4. Subject: A question about declaring/passing arrays of structures
  5. Date: 17 Jan 1996 19:07:24 GMT
  6. Organization: The University of Akron, Akron, Ohio
  7. Distribution: na
  8. Message-ID: <4djhdc$kp3@kira.cc.uakron.edu>
  9. NNTP-Posting-Host: dax.cc.uakron.edu
  10.  
  11.      I have recently been having trouble getting a program to work.  It
  12. consists of 6 variables, which are all arrays of structures.  It seems
  13. that when I pass them to a function, (located in another file), the
  14. compiler will flag a fatal error on some of them.  They are all defined
  15. properly in a '.h' file, and linked to from the main program file,
  16. (containing the 'main' function).  There is nothing really unique about
  17. the functions that work.  Most of them consist of a few character
  18. variables, a few integers, and 5 of the 6 contain a character array, set
  19. to a certain length by a constant.
  20.      The error that I get is a 'General Protection Error' at 0001:3???,
  21. which seems low in memory.  But, when I comment out a for-next loop
  22. that is immediately after the function call, I get a 'Stack Fault' error
  23. at ALMOST the same location.  I'm baffled.  I've had assembler, and
  24. several programming courses, but this one puzzles me.
  25.      Does anybody have a possible solution?  If so, e-mail PERSONALLY,
  26. as I don't get to read the news often.  Your help is VERY MUCH
  27. appreciated, as I have been trying to remedy this problem for almost 4
  28. months now, with no success!!
  29.  
  30. Tim Berg
  31.  
  32.